Colorize Command
February 19, 2023
Last updated on August 17, 2026
The Colorize command applies colorized syntax highlighting to selected source code. Supported languages include
|
|
|
Choose the default font to apply to selected text from the Colorizer sheet in Settings.
Shortcut
The Colorize button is available under the OneMore ribbon tab. But there is a faster keyboard shortcut: press Alt + C to display the Select Language dialog.

You can quickly get to a language by typing the first letter of its name and apply syntax highlighting by pressing Enter. Close the dialog and cancel the action by pressing Esc.
Caveats
The highlighting is not as complete as you might find in VS or VSCode but then OneNote isn't intended to be a programming editor anyway.
The parser will colorize one paragraph at a time. For example, an XML opening tag and its attributes must all appear in one contiguous paragraph or they will be ignored.
<address
street="123 Main St"
city="Anytown" />
Since that XML is spread across three separate lines (three paragraphs in OneNote) it will not be recognized as XML. But if it were on a single line, then it will be recognized, such as
<address street="123 Main St" city="Anytown" />
Definition Files
Languages are defined in JSON definition files located below the OneMore installation directory so they can be customized and enhanced and new languages can be added. If you're so inclined to add enhancements or define a new language, please submit a pull request.
#omwiki #omcommands
© 2020 Steven M Cohn. All rights reserved.
Please consider a sponsorship or one-time donation to support ongoing development
Created with OneNote.